// ====================================================
//
// This file is part of the Cscec81 Passport Base Platform.
//
// Create by Cscec81 <support@cscec81.com>
// Copyright (c) 2020-2025 cscec81.com
//
// ====================================================

package com.cscec81.passport.base.commons.concurrent;

import com.google.common.util.concurrent.ListenableFuture;

import java.util.concurrent.Callable;
import java.util.concurrent.Executor;

public interface ListeningExecutor extends Executor {

  <T> ListenableFuture<T> executeAsync(Callable<T> task);

  default <T> ListenableFuture<T> submit(Callable<T> task) {
    return executeAsync(task);
  }
}
